package com.news.service;


import com.news.pojo.Topic;

import java.sql.SQLException;
import java.util.List;

public interface TopicService {
    /**
     * 增添主题
     * @param topic
     * @return
     */
    public boolean addTopic(Topic topic) throws SQLException;

    /**
     * 删除主题
     * @param tid
     * @return
     */
    public boolean delTopic(int tid) throws SQLException;

    /**
     * 修改新闻主题
     * @param topic
     * @return
     */
    public boolean updateTopic(Topic topic) throws SQLException;

    /**
     * 查询所有的主题
     * @return
     */
    public List<Topic> getAll() throws SQLException;

    /**
     * 通过 主题名字查询主题
     * @param tname
     * @return
     */
    public Topic getTopicByName(String tname) throws SQLException;

}
